#include "Camera.h"
using namespace renderengine;
Camera::Camera()
{
    m_eye = glm::vec3(0.0, 0.0, -1.0);
    m_pos = glm::vec3(0.0, 0.0, 0.0);
    m_up = glm::vec3(0.0, 1.0, 0.0);
}

Camera::~Camera()
{

}

void renderengine::Camera::LookAt(glm::vec3 eye, glm::vec3 point, glm::vec3 up)
{
    m_ViewMatrix = glm::lookAt(eye, point, up);
    this->m_eye = eye;
    this->m_pos = point;
    this->m_up = up;
}

glm::mat4 renderengine::Camera::getViewMatrix() const
{
    return m_ViewMatrix;
}

void renderengine::Camera::setViewMatrix(glm::mat4 _viewMatrix)
{
    m_ViewMatrix = _viewMatrix;
}

glm::mat4 renderengine::Camera::getProjectionMatrix() const
{
    return m_ProjectionMatrix;
}

void renderengine::Camera::setProjectionMatrix(glm::mat4 _projectionMatrix)
{
    m_ProjectionMatrix = _projectionMatrix;
}

void renderengine::Camera::setFrustum(Frustum _frustum)
{
    m_Frustum = _frustum;
}

void renderengine::Camera::setProjectionType(PROJECTION_TYPE _type)
{
    m_projType = _type;
}

glm::vec3 renderengine::Camera::getPosition()
{
    return m_pos;
}

glm::vec3 renderengine::Camera::getEye()
{
    return m_eye;
}

glm::vec3 renderengine::Camera::getUp()
{
    return m_up;
}
